package test.test1201;

public class test007 {
    public static void main(String[] args) {
        int win = 0;
        int lose = 0;
        double arr[] = new double[]{10.4, -3, -6.2, 1.2, -6.1, -19, -3.8, 0.9, -4.5, 5.5};
        for (int i = 0; i < 10; i++) {
            if (arr[i] > 0) {
                win += 1;
            } else if (arr[i] < 0) {
                lose += 1;
            }
        }
        System.out.println("赚钱的股票一共有：" + win + "只");
        System.out.println("赔钱的股票一共有：" + lose + "只");
    }
}
